package org.zezi.loader.provider;

import android.net.Uri;
import android.provider.BaseColumns;

public final class ShopListContract {

	public static final String AUTHORITY = "org.zezi.loader.provider.ShopList";

	// This class cannot be instantiated
	private ShopListContract() {
	}
	
	public static final class Items implements BaseColumns {

        // This class cannot be instantiated
        private Items() {}

        /**
         * The table name offered by this provider
         */
        public static final String TABLE_NAME = "items";

        /*
         * URI definitions
         */

        /**
         * The scheme part for this provider's URI
         */
        private static final String SCHEME = "content://";

        /**
         * Path parts for the URIs
         */

        /**
         * Path part for the Items URI
         */
        private static final String PATH_ITEMS = "/items";

        /**
         * Path part for the Item ID URI
         */
        private static final String PATH_ITEM_ID = "/items/";
        
        private static final String PATH_SEGMENT_FILTER = "filter";

        /**
         * 0-relative position of a note ID segment in the path part of a item ID URI
         */
        public static final int ITEM_ID_PATH_POSITION = 1;
        public static final int ITEM_FILTER_PATH_POSITION = 2;

        /**
         * The content:// style URL for this table
         */
        public static final Uri CONTENT_URI =  Uri.parse(SCHEME + AUTHORITY + PATH_ITEMS);
        
		public static final Uri CONTENT_FILTER_URI = Uri.withAppendedPath(CONTENT_URI, PATH_SEGMENT_FILTER);

        /**
         * The content URI base for a single note. Callers must
         * append a numeric item id to this Uri to retrieve an item
         */
        public static final Uri CONTENT_ID_URI_BASE
            = Uri.parse(SCHEME + AUTHORITY + PATH_ITEM_ID);

        /**
         * The content URI match pattern for a single item, specified by its ID. Use this to match
         * incoming URIs or to construct an Intent.
         */
        public static final Uri CONTENT_ID_URI_PATTERN
            = Uri.parse(SCHEME + AUTHORITY + PATH_ITEM_ID + "/#");

        /*
         * MIME type definitions
         */

        /**
         * The MIME type of {@link #CONTENT_URI} providing a directory of items.
         */
        public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.org.zezula.item";

        /**
         * The MIME type of a {@link #CONTENT_URI} sub-directory of a single
         * item.
         */
        public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.org.zezula.item";

        /**
         * The default sort order for this table
         */
        public static final String DEFAULT_SORT_ORDER = "name DESC";

        /*
         * Column definitions
         */

        /**
         * Column name for the name of the item
         * <P>Type: TEXT</P>
         */
        public static final String COLUMN_NAME_NAME = "name";

        /**
         * Column name for the count
         * <P>Type: INTEGER</P>
         */
        public static final String COLUMN_NAME_COUNT = "count";

    }
}
